import 'package:flutter/material.dart';

class HomePage extends StatefulWidget {

  @override
  State<StatefulWidget> createState() => _HomePageState();
}

class _HomePageState extends State {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("文件管理"),
      ),
      body: ListView.builder(
        padding: EdgeInsets.all(16.0),
        itemBuilder: (context, i){
          return _buildCell(context, i);
        },
      ),
    );
  }

  Widget _buildCell(context, i) {
    return GestureDetector(
      child: Container(
      height: 90,
      child: Row(
        children: <Widget>[
          Icon(Icons.picture_as_pdf),
          Column(
            children: <Widget>[
              Text("name"),
              Text("date")
            ],
          )
        ],
      ),
    ),
    onTap: (){
      Navigator.pushNamed(context, "/file_view");
    },
    );
  }

}